package com.lk.pet.customer.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import java.util.List;

@RestController
@RequestMapping("/nacos")
public class NacosTestController {
    @Autowired
    RestTemplate restTemplate;

    @GetMapping("/vets")
    public List vets(){
        return restTemplate.getForObject("http://vet-service/vet/vets", List.class);
    }
}
